<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>编辑日历签到</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :model="form" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">日历签到</div>
            </div>
            <el-descriptions :column="2" border size="small">
                <el-descriptions-item label="签到模式">
                    <el-form-item prop="Calendar_Scheme_Mode">
                        <el-radio v-model="form.Calendar_Scheme_Mode" label="0">日历签到</el-radio>
                        <el-radio v-model="form.Calendar_Scheme_Mode" label="1">周期签到</el-radio>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">签到明细</div>
                <div class="operation">
                    <el-button type="primary" size="small" @click="add_calendar_scheme_detail">新增</el-button>
                    <el-button type="danger" size="small" @click="remove_calendar_scheme_detail">删除</el-button>
                </div>
            </div>
            <el-descriptions v-for="(item,index) in form.Children.calendar_scheme_detail" :column="2" border size="small">
                <el-descriptions-item label="日签/年签">
                    <el-form-item prop="Calendar_Scheme_Type">
                        <el-radio v-model="item.Calendar_Scheme_Type" label="0">每日签到获取</el-radio>
                        <el-radio v-model="item.Calendar_Scheme_Type" label="1">连续签到获取</el-radio>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="连签天数">
                    <el-form-item prop="Calendar_Scheme_Day">
                        <el-input :disabled="item.Calendar_Scheme_Type=='0'" v-model="item.Calendar_Scheme_Day" placeholder="请输入签到天数" clearable />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="奖励类型">
                    <el-form-item prop="Calendar_Scheme_Reward">
                        <el-select v-model.trim="item.Calendar_Scheme_Reward" placeholder="请选择奖励" filterable style="width: 100%">
                            <el-option v-for="(item,index) in calendar_scheme_reward" :key="index" :label="item.Reward_Name"
                              :value="item.Calendar_Scheme_Reward_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                
                <el-descriptions-item label="奖励数量">
                    <el-form-item prop="Calendar_Scheme_Number">
                        <el-input v-model="item.Calendar_Scheme_Number" placeholder="请输入奖励数量" clearable />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="领取限制">
                    <el-form-item prop="Calendar_Scheme_Quantity">
                        <el-input v-model="item.Calendar_Scheme_Quantity" placeholder="无限制" clearable />
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">所属店铺</div>
                <div class="operation">
                    <el-button type="primary" size="small" @click="add_calendar_scheme_storescope">新增</el-button>
                    <el-button type="danger" size="small" @click="remove_calendar_scheme_storescope">删除</el-button>
                </div>
            </div>
            <div style="margin-bottom: 100px;">
                <el-descriptions v-for="(item,index) in form.Children.calendar_scheme_storescope" :key="index" :column="2" border size="small">
                    <el-descriptions-item label="所属店铺">
                        <el-form-item prop="Store_SerialNumber">
                            <el-select v-model.trim="item.Store_SerialNumber" placeholder="请选择店铺" filterable style="width: 100%">
                                <el-option v-for="(item,index) in store" :key="index" :label="item.Store_Name"
                                  :value="item.Store_SerialNumber"></el-option>
                              </el-select>
                        </el-form-item>
                    </el-descriptions-item>
                </el-descriptions>
            </div>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../utils/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="./js/Config.js"></script>
</body>

</html>